package com.wohuijituan.whcsmerchant.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.wohuijituan.whcsmerchant.R;
import com.wohuijituan.whcsmerchant.bean.DrawMoneyListBean;

import java.util.List;

/**
 * Created by zsy_18 on 2016/12/27.
 */

public class DrawRecordAdapter extends MyBaseAdapter<DrawMoneyListBean.DataBeanX.DataBean> {
    public DrawRecordAdapter(Context ctx, List<DrawMoneyListBean.DataBeanX.DataBean> dataList) {
        super(ctx, dataList);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder vh;
        if (convertView==null){
            convertView = View.inflate(ctx, R.layout.item_income_record,null);
            vh = new ViewHolder(convertView);
            convertView.setTag(vh);
        }else {
            vh = (ViewHolder) convertView.getTag();
        }
        DrawMoneyListBean.DataBeanX.DataBean data = dataList.get(position);
        vh.recordMoney.setText(data.getSMW_RealMoney()+"");
        vh.recordTime.setText(data.getSMW_OperateTime()+"");
        return convertView;
    }
    protected class ViewHolder {
        private TextView recordMoney;
        private TextView recordTime;

        public ViewHolder(View view) {
            recordMoney = (TextView) view.findViewById(R.id.record_money);
            recordTime = (TextView) view.findViewById(R.id.record_time);
        }
    }
}
